@echo off
set INST-PATH=echo %cd:~0,2%
set INST-REPO=%INST-PATH%\REPO
rem Aktuelles Laufwerk mit \
set AKT-PATH=%~dp0

if not exist nircmd.exe goto NO_NIRCMD

echo *** Energieoptionen anpassen ***
powercfg -l | find "Maximale Leistung" > "%TEMP%\guuid.tmp"
FOR /F "Tokens=4" %%i in ("%TEMP%\guuid.tmp") do powercfg -s %%i
powercfg -H Off
del /q "%TEMP%\guuid.tmp"

if not exist "c:\program files (x86)\windows live\installer\wlarp.exe" goto NO_WINLIVE
echo *** Entferne Windows Live ***
"c:\program files (x86)\windows live\installer\wlarp.exe" /cleanup:all /q
echo Errorlevel = %ERRORLEVEL%
:NO_WINLIVE

if not exist "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\newfolder1" goto NO_NEWFOLDER1
echo *** Entferne Newfolder1 ***
rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\newfolder1"
echo Errorlevel = %ERRORLEVEL%
:NO_NEWFOLDER1

if not exist "C:\ProgramData\Microsoft\Windows\Start Menu\Symantec Install NIS (Norton Internet Security).lnk" goto NO_NIS
echo *** Entferne NIS ***
del /q "C:\ProgramData\Microsoft\Windows\Start Menu\Symantec Install NIS (Norton Internet Security).lnk"
echo Errorlevel = %ERRORLEVEL%
:NO_NIS

if not exist "C:\ProgramData\Microsoft\Windows\Start Menu\Business-in-a-Box Installer.lnk" goto NO_BIB
echo *** Entferne Business in a Box ***
del /q "C:\ProgramData\Microsoft\Windows\Start Menu\Business-in-a-Box Installer.lnk"
echo Errorlevel = %ERRORLEVEL%
:NO_BIB

if not exist "C:\ProgramData\Microsoft\Windows\Start Menu\Free Skype voice and video calls.lnk" goto NO_SKYPE
echo *** Entferne Skype ***
del /q "C:\ProgramData\Microsoft\Windows\Start Menu\Free Skype voice and video calls.lnk"
echo Errorlevel = %ERRORLEVEL%
:NO_SKYPE

echo *** Entferne BingBar ***
MsiExec.exe /X{1E03DB52-D5CB-4338-A338-E526DD4D4DB1} /passive
echo Errorlevel = %ERRORLEVEL%

echo *** Entferne VIP Access ***
MsiExec.exe /X{E8D46836-CD55-453C-A107-A59EC51CB8DC} /passive /norestart
echo Errorlevel = %ERRORLEVEL%

echo *** Installiere Office 2010 SP1 ***
"%INST-REPO%\officesuite2010sp1-kb2460049-x86-fullfile-de-de.exe" /passive /norestart
echo Errorlevel = %ERRORLEVEL%

echo *** Installiere Flash Player ***
copy "%INST-REPO%\install_flashplayer10ax_gtbd_aih-sic.exe" "%TEMP%\install_flashplayer.exe"
nircmd killprocess iexplore.exe
"%TEMP%\install_flashplayer.exe" /passive
nircmd wait 500
nircmd win close title "Adobe Flash Player-Installationsprogramm"
echo Errorlevel = %ERRORLEVEL%

echo *** Installiere Adobe Acrobat ***
msiexec /i "%INST-REPO%\AdbeRdr1010_de_DE.msi" /passive /norestart /qb
echo Errorlevel = %ERRORLEVEL%

echo *** Installiere Oracle Java ***
msiexec /i "%INST-REPO%\jre1.6.0_26\jre1.6.0_26.msi" /passive /norestart /qb ADDLOCAL=ALL IEXPLORER=1 REBOOT=Suppress
echo Errorlevel = %ERRORLEVEL%

echo *** Papierkorb leeren ***
nircmd emptybin
echo Errorlevel = %ERRORLEVEL%

echo *** Beep because most things are ready ***
nircmd beep 600 500

echo *** Laufwerk defragmentieren ***
defrag c:
echo Errorlevel = %ERRORLEVEL%

rem ***** Schlusssequenz *****
nircmd beep 600 500
nircmd wait 50
nircmd beep 600 500
nircmd wait 50
nircmd beep 600 500
echo *** Fertig ***

goto ENDE


rem --------------------------------------------------------------------------------------------
:NO_NIRCMD
echo.
echo Can'find the tool NIRCMD.EXE.
echo Please download NIRCMD from www.nirsoft.net
echo.
exit 99

rem --------------------------------------------------------------------------------------------
--- Show Hidden Folders and Files
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Hidden" "1"

--- Disable the Thumbnail Cache
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "DisableThumbnailCache" "1"

--- Launch Folder Windows in a Separate Process
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "SeparateProcess" "1"

--- Show the "Laufwerke verbinden"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "MapNetDrvBtn" "1"

--- Dateierweiterungen anzeigen
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideFileExt" "0"

--- Freigabeassistent deaktivieren
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "SharingWizardOn" "0"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowControlPanel" "2"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowDownloads" "2"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowMyComputer" "2"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowMyGames" "0"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowMyMusic" "0"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowMyPics" "0"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowNetPlaces" "1"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowRun" "1"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowUser" "2"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowTrackDocs" "0"
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_ShowTrackProgs" "0"
-- Disable Animations
nircmd regsetval dword "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "TaskbarAnimations" "0"

:ENDE
pause